1. Field of the Invention
The present invention relates to an image processing apparatus having a cropping function for cropping part of a captured image, a rotation function for rotating the image, an optical distortion correction function for correcting optical distortion, and the like, and an image processing method thereof.
2. Description of the Related Art
Conventionally, in an imaging apparatus, optical distortion, such as chromatic aberration and light falloff at edges, can occur on a captured image due to the effects of the imaging optical system. Thus, image processing application software for an imaging apparatus, a personal computer (hereinafter, “PC”), or the like provided with a function for correcting various kinds of optical distortion, such as chromatic aberration and light falloff at edges, is commercially available. For example, as discussed in Japanese Patent Application Laid-Open No. 2004-94124, to correct optical distortion, a correction amount has to be changed according to the image height (in an optical image formed on an image sensor by light passing through a lens, the distance from the point where the light passes through a position which is the center of radially changing optical characteristics of the lens to the target point).
On the other hand, some imaging apparatuses have a cropping function for cropping part of a captured image and an electronic zoom function for cropping and recording a part of the image.
Further, the cropping processing of the image can also be performed by inputting the image captured by the imaging apparatus into a PC via a recording medium and using the application software installed on the PC.
However, in an image which has been subjected to such cropping processing or electronic zoom processing (variable magnification processing), the image height cannot be necessarily the distance from the center of the image. That is, sometimes the center position of the image after the processing (hereinafter, sometimes referred to as “the post-image processing image”) differs from the center position of the image before the processing (hereinafter, sometimes referred to as “the pre-image processing image”).
Thus, for an image which has once been subjected to cropping processing or electronic zoom processing, sometimes the correct image height cannot be calculated. As a result, it may be impossible to correctly perform the optical distortion correction, such as chromatic aberration and light falloff at edges, when the image is subsequently read.
Further, in addition to the cropping processing or electronic zoom processing, the image captured by the imaging apparatus may also be subjected to rotation processing for adjusting a horizontal position of the captured image. When performing rotation processing, similar to the case described above, in some cases the correct image height cannot be calculated, so that the optical distortion correction cannot be correctly performed when the image is subsequently read.